\doxysection{list.\+h}
\hypertarget{list_8h_source}{}\label{list_8h_source}\index{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/Third\_Party/FreeRTOS/Source/include/list.h@{C:/Users/ASUS/Desktop/dm-\/ctrlH7-\/balance-\/9025test/Middlewares/Third\_Party/FreeRTOS/Source/include/list.h}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{00002\ \textcolor{comment}{\ *\ FreeRTOS\ Kernel\ V10.3.1}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *\ Copyright\ (C)\ 2020\ Amazon.com,\ Inc.\ or\ its\ affiliates.\ \ All\ Rights\ Reserved.}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ Permission\ is\ hereby\ granted,\ free\ of\ charge,\ to\ any\ person\ obtaining\ a\ copy\ of}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ this\ software\ and\ associated\ documentation\ files\ (the\ "{}Software"{}),\ to\ deal\ in}}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ the\ Software\ without\ restriction,\ including\ without\ limitation\ the\ rights\ to}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ use,\ copy,\ modify,\ merge,\ publish,\ distribute,\ sublicense,\ and/or\ sell\ copies\ of}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ the\ Software,\ and\ to\ permit\ persons\ to\ whom\ the\ Software\ is\ furnished\ to\ do\ so,}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ subject\ to\ the\ following\ conditions:}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ The\ above\ copyright\ notice\ and\ this\ permission\ notice\ shall\ be\ included\ in\ all}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ copies\ or\ substantial\ portions\ of\ the\ Software.}}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ THE\ SOFTWARE\ IS\ PROVIDED\ "{}AS\ IS"{},\ WITHOUT\ WARRANTY\ OF\ ANY\ KIND,\ EXPRESS\ OR}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ IMPLIED,\ INCLUDING\ BUT\ NOT\ LIMITED\ TO\ THE\ WARRANTIES\ OF\ MERCHANTABILITY,\ FITNESS}}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ FOR\ A\ PARTICULAR\ PURPOSE\ AND\ NONINFRINGEMENT.\ IN\ NO\ EVENT\ SHALL\ THE\ AUTHORS\ OR}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ COPYRIGHT\ HOLDERS\ BE\ LIABLE\ FOR\ ANY\ CLAIM,\ DAMAGES\ OR\ OTHER\ LIABILITY,\ WHETHER}}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ IN\ AN\ ACTION\ OF\ CONTRACT,\ TORT\ OR\ OTHERWISE,\ ARISING\ FROM,\ OUT\ OF\ OR\ IN}}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ CONNECTION\ WITH\ THE\ SOFTWARE\ OR\ THE\ USE\ OR\ OTHER\ DEALINGS\ IN\ THE\ SOFTWARE.}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ http://www.FreeRTOS.org}}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *\ http://aws.amazon.com/freertos}}
\DoxyCodeLine{00024\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00025\ \textcolor{comment}{\ *\ 1\ tab\ ==\ 4\ spaces!}}
\DoxyCodeLine{00026\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{comment}{/*}}
\DoxyCodeLine{00029\ \textcolor{comment}{\ *\ This\ is\ the\ list\ implementation\ used\ by\ the\ scheduler.\ \ While\ it\ is\ tailored}}
\DoxyCodeLine{00030\ \textcolor{comment}{\ *\ heavily\ for\ the\ schedulers\ needs,\ it\ is\ also\ available\ for\ use\ by}}
\DoxyCodeLine{00031\ \textcolor{comment}{\ *\ application\ code.}}
\DoxyCodeLine{00032\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00033\ \textcolor{comment}{\ *\ list\_ts\ can\ only\ store\ pointers\ to\ list\_item\_ts.\ \ Each\ ListItem\_t\ contains\ a}}
\DoxyCodeLine{00034\ \textcolor{comment}{\ *\ numeric\ value\ (xItemValue).\ \ Most\ of\ the\ time\ the\ lists\ are\ sorted\ in}}
\DoxyCodeLine{00035\ \textcolor{comment}{\ *\ descending\ item\ value\ order.}}
\DoxyCodeLine{00036\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00037\ \textcolor{comment}{\ *\ Lists\ are\ created\ already\ containing\ one\ list\ item.\ \ The\ value\ of\ this}}
\DoxyCodeLine{00038\ \textcolor{comment}{\ *\ item\ is\ the\ maximum\ possible\ that\ can\ be\ stored,\ it\ is\ therefore\ always\ at}}
\DoxyCodeLine{00039\ \textcolor{comment}{\ *\ the\ end\ of\ the\ list\ and\ acts\ as\ a\ marker.\ \ The\ list\ member\ pxHead\ always}}
\DoxyCodeLine{00040\ \textcolor{comment}{\ *\ points\ to\ this\ marker\ -\/\ even\ though\ it\ is\ at\ the\ tail\ of\ the\ list.\ \ This}}
\DoxyCodeLine{00041\ \textcolor{comment}{\ *\ is\ because\ the\ tail\ contains\ a\ wrap\ back\ pointer\ to\ the\ true\ head\ of}}
\DoxyCodeLine{00042\ \textcolor{comment}{\ *\ the\ list.}}
\DoxyCodeLine{00043\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00044\ \textcolor{comment}{\ *\ In\ addition\ to\ it's\ value,\ each\ list\ item\ contains\ a\ pointer\ to\ the\ next}}
\DoxyCodeLine{00045\ \textcolor{comment}{\ *\ item\ in\ the\ list\ (pxNext),\ a\ pointer\ to\ the\ list\ it\ is\ in\ (pxContainer)}}
\DoxyCodeLine{00046\ \textcolor{comment}{\ *\ and\ a\ pointer\ to\ back\ to\ the\ object\ that\ contains\ it.\ \ These\ later\ two}}
\DoxyCodeLine{00047\ \textcolor{comment}{\ *\ pointers\ are\ included\ for\ efficiency\ of\ list\ manipulation.\ \ There\ is}}
\DoxyCodeLine{00048\ \textcolor{comment}{\ *\ effectively\ a\ two\ way\ link\ between\ the\ object\ containing\ the\ list\ item\ and}}
\DoxyCodeLine{00049\ \textcolor{comment}{\ *\ the\ list\ item\ itself.}}
\DoxyCodeLine{00050\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00051\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00052\ \textcolor{comment}{\ *\ \(\backslash\)page\ ListIntroduction\ List\ Implementation}}
\DoxyCodeLine{00053\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ FreeRTOSIntro}}
\DoxyCodeLine{00054\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \textcolor{preprocessor}{\#ifndef\ INC\_FREERTOS\_H}}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\ \ \ \ \#error\ FreeRTOS.h\ must\ be\ included\ before\ list.h}}
\DoxyCodeLine{00058\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00059\ }
\DoxyCodeLine{00060\ \textcolor{preprocessor}{\#ifndef\ LIST\_H}}
\DoxyCodeLine{00061\ \textcolor{preprocessor}{\#define\ LIST\_H}}
\DoxyCodeLine{00062\ }
\DoxyCodeLine{00063\ \textcolor{comment}{/*}}
\DoxyCodeLine{00064\ \textcolor{comment}{\ *\ The\ list\ structure\ members\ are\ modified\ from\ within\ interrupts,\ and\ therefore}}
\DoxyCodeLine{00065\ \textcolor{comment}{\ *\ by\ rights\ should\ be\ declared\ volatile.\ \ However,\ they\ are\ only\ modified\ in\ a}}
\DoxyCodeLine{00066\ \textcolor{comment}{\ *\ functionally\ atomic\ way\ (within\ critical\ sections\ of\ with\ the\ scheduler}}
\DoxyCodeLine{00067\ \textcolor{comment}{\ *\ suspended)\ and\ are\ either\ passed\ by\ reference\ into\ a\ function\ or\ indexed\ via}}
\DoxyCodeLine{00068\ \textcolor{comment}{\ *\ a\ volatile\ variable.\ \ Therefore,\ in\ all\ use\ cases\ tested\ so\ far,\ the\ volatile}}
\DoxyCodeLine{00069\ \textcolor{comment}{\ *\ qualifier\ can\ be\ omitted\ in\ order\ to\ provide\ a\ moderate\ performance}}
\DoxyCodeLine{00070\ \textcolor{comment}{\ *\ improvement\ without\ adversely\ affecting\ functional\ behaviour.\ \ The\ assembly}}
\DoxyCodeLine{00071\ \textcolor{comment}{\ *\ instructions\ generated\ by\ the\ IAR,\ ARM\ and\ GCC\ compilers\ when\ the\ respective}}
\DoxyCodeLine{00072\ \textcolor{comment}{\ *\ compiler's\ options\ were\ set\ for\ maximum\ optimisation\ has\ been\ inspected\ and}}
\DoxyCodeLine{00073\ \textcolor{comment}{\ *\ deemed\ to\ be\ as\ intended.\ \ That\ said,\ as\ compiler\ technology\ advances,\ and}}
\DoxyCodeLine{00074\ \textcolor{comment}{\ *\ especially\ if\ aggressive\ cross\ module\ optimisation\ is\ used\ (a\ use\ case\ that}}
\DoxyCodeLine{00075\ \textcolor{comment}{\ *\ has\ not\ been\ exercised\ to\ any\ great\ extend)\ then\ it\ is\ feasible\ that\ the}}
\DoxyCodeLine{00076\ \textcolor{comment}{\ *\ volatile\ qualifier\ will\ be\ needed\ for\ correct\ optimisation.\ \ It\ is\ expected}}
\DoxyCodeLine{00077\ \textcolor{comment}{\ *\ that\ a\ compiler\ removing\ essential\ code\ because,\ without\ the\ volatile}}
\DoxyCodeLine{00078\ \textcolor{comment}{\ *\ qualifier\ on\ the\ list\ structure\ members\ and\ with\ aggressive\ cross\ module}}
\DoxyCodeLine{00079\ \textcolor{comment}{\ *\ optimisation,\ the\ compiler\ deemed\ the\ code\ unnecessary\ will\ result\ in}}
\DoxyCodeLine{00080\ \textcolor{comment}{\ *\ complete\ and\ obvious\ failure\ of\ the\ scheduler.\ \ If\ this\ is\ ever\ experienced}}
\DoxyCodeLine{00081\ \textcolor{comment}{\ *\ then\ the\ volatile\ qualifier\ can\ be\ inserted\ in\ the\ relevant\ places\ within\ the}}
\DoxyCodeLine{00082\ \textcolor{comment}{\ *\ list\ structures\ by\ simply\ defining\ configLIST\_VOLATILE\ to\ volatile\ in}}
\DoxyCodeLine{00083\ \textcolor{comment}{\ *\ FreeRTOSConfig.h\ (as\ per\ the\ example\ at\ the\ bottom\ of\ this\ comment\ block).}}
\DoxyCodeLine{00084\ \textcolor{comment}{\ *\ If\ configLIST\_VOLATILE\ is\ not\ defined\ then\ the\ preprocessor\ directives\ below}}
\DoxyCodeLine{00085\ \textcolor{comment}{\ *\ will\ simply\ \#define\ configLIST\_VOLATILE\ away\ completely.}}
\DoxyCodeLine{00086\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00087\ \textcolor{comment}{\ *\ To\ use\ volatile\ list\ structure\ members\ then\ add\ the\ following\ line\ to}}
\DoxyCodeLine{00088\ \textcolor{comment}{\ *\ FreeRTOSConfig.h\ (without\ the\ quotes):}}
\DoxyCodeLine{00089\ \textcolor{comment}{\ *\ "{}\#define\ configLIST\_VOLATILE\ volatile"{}}}
\DoxyCodeLine{00090\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00091\ \textcolor{preprocessor}{\#ifndef\ configLIST\_VOLATILE}}
\DoxyCodeLine{00092\ \textcolor{preprocessor}{\ \ \ \ \#define\ configLIST\_VOLATILE}}
\DoxyCodeLine{00093\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ configSUPPORT\_CROSS\_MODULE\_OPTIMISATION\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00095\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00096\ \textcolor{keyword}{extern}\ \textcolor{stringliteral}{"{}C"{}}\ \{}
\DoxyCodeLine{00097\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \textcolor{comment}{/*\ Macros\ that\ can\ be\ used\ to\ place\ known\ values\ within\ the\ list\ structures,}}
\DoxyCodeLine{00100\ \textcolor{comment}{then\ check\ that\ the\ known\ values\ do\ not\ get\ corrupted\ during\ the\ execution\ of}}
\DoxyCodeLine{00101\ \textcolor{comment}{the\ application.\ \ \ These\ may\ catch\ the\ list\ data\ structures\ being\ overwritten\ in}}
\DoxyCodeLine{00102\ \textcolor{comment}{memory.\ \ They\ will\ not\ catch\ data\ errors\ caused\ by\ incorrect\ configuration\ or}}
\DoxyCodeLine{00103\ \textcolor{comment}{use\ of\ FreeRTOS.*/}}
\DoxyCodeLine{00104\ \textcolor{preprocessor}{\#if(\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ ==\ 0\ )}}
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{comment}{/*\ Define\ the\ macros\ to\ do\ nothing.\ */}}
\DoxyCodeLine{00106\ \textcolor{preprocessor}{\ \ \ \ \#define\ listFIRST\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00107\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSECOND\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00108\ \textcolor{preprocessor}{\ \ \ \ \#define\ listFIRST\_LIST\_INTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00109\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSECOND\_LIST\_INTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00110\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_FIRST\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE(\ pxItem\ )}}
\DoxyCodeLine{00111\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_SECOND\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE(\ pxItem\ )}}
\DoxyCodeLine{00112\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_LIST\_INTEGRITY\_CHECK\_1\_VALUE(\ pxList\ )}}
\DoxyCodeLine{00113\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_LIST\_INTEGRITY\_CHECK\_2\_VALUE(\ pxList\ )}}
\DoxyCodeLine{00114\ \textcolor{preprocessor}{\ \ \ \ \#define\ listTEST\_LIST\_ITEM\_INTEGRITY(\ pxItem\ )}}
\DoxyCodeLine{00115\ \textcolor{preprocessor}{\ \ \ \ \#define\ listTEST\_LIST\_INTEGRITY(\ pxList\ )}}
\DoxyCodeLine{00116\ \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{00117\ \ \ \ \ \textcolor{comment}{/*\ Define\ macros\ that\ add\ new\ members\ into\ the\ list\ structures.\ */}}
\DoxyCodeLine{00118\ \textcolor{preprocessor}{\ \ \ \ \#define\ listFIRST\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TickType\_t\ xListItemIntegrityValue1;}}
\DoxyCodeLine{00119\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSECOND\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ TickType\_t\ xListItemIntegrityValue2;}}
\DoxyCodeLine{00120\ \textcolor{preprocessor}{\ \ \ \ \#define\ listFIRST\_LIST\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TickType\_t\ xListIntegrityValue1;}}
\DoxyCodeLine{00121\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSECOND\_LIST\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TickType\_t\ xListIntegrityValue2;}}
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ \ \ \ \ \textcolor{comment}{/*\ Define\ macros\ that\ set\ the\ new\ structure\ members\ to\ known\ values.\ */}}
\DoxyCodeLine{00124\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_FIRST\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE(\ pxItem\ )\ \ \ \ \ (\ pxItem\ )-\/>xListItemIntegrityValue1\ =\ pdINTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00125\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_SECOND\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE(\ pxItem\ )\ \ \ \ (\ pxItem\ )-\/>xListItemIntegrityValue2\ =\ pdINTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00126\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_LIST\_INTEGRITY\_CHECK\_1\_VALUE(\ pxList\ )\ \ \ \ \ \ (\ pxList\ )-\/>xListIntegrityValue1\ =\ pdINTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00127\ \textcolor{preprocessor}{\ \ \ \ \#define\ listSET\_LIST\_INTEGRITY\_CHECK\_2\_VALUE(\ pxList\ )\ \ \ \ \ \ (\ pxList\ )-\/>xListIntegrityValue2\ =\ pdINTEGRITY\_CHECK\_VALUE}}
\DoxyCodeLine{00128\ }
\DoxyCodeLine{00129\ \ \ \ \ \textcolor{comment}{/*\ Define\ macros\ that\ will\ assert\ if\ one\ of\ the\ structure\ members\ does\ not}}
\DoxyCodeLine{00130\ \textcolor{comment}{\ \ \ \ contain\ its\ expected\ value.\ */}}
\DoxyCodeLine{00131\ \textcolor{preprocessor}{\ \ \ \ \#define\ listTEST\_LIST\_ITEM\_INTEGRITY(\ pxItem\ )\ \ \ \ \ \ configASSERT(\ (\ (\ pxItem\ )-\/>xListItemIntegrityValue1\ ==\ pdINTEGRITY\_CHECK\_VALUE\ )\ \&\&\ (\ (\ pxItem\ )-\/>xListItemIntegrityValue2\ ==\ pdINTEGRITY\_CHECK\_VALUE\ )\ )}}
\DoxyCodeLine{00132\ \textcolor{preprocessor}{\ \ \ \ \#define\ listTEST\_LIST\_INTEGRITY(\ pxList\ )\ \ \ \ \ \ \ \ \ \ \ configASSERT(\ (\ (\ pxList\ )-\/>xListIntegrityValue1\ ==\ pdINTEGRITY\_CHECK\_VALUE\ )\ \&\&\ (\ (\ pxList\ )-\/>xListIntegrityValue2\ ==\ pdINTEGRITY\_CHECK\_VALUE\ )\ )}}
\DoxyCodeLine{00133\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{/*\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{00134\ }
\DoxyCodeLine{00135\ }
\DoxyCodeLine{00136\ \textcolor{comment}{/*}}
\DoxyCodeLine{00137\ \textcolor{comment}{\ *\ Definition\ of\ the\ only\ type\ of\ object\ that\ a\ list\ can\ contain.}}
\DoxyCodeLine{00138\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00139\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t}{xLIST}};}
\DoxyCodeLine{00140\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t___i_t_e_m}{xLIST\_ITEM}}}
\DoxyCodeLine{00141\ \{}
\DoxyCodeLine{00142\ \ \ \ \ listFIRST\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Set\ to\ a\ known\ value\ if\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ is\ set\ to\ 1.\ */}}
\DoxyCodeLine{00143\ \ \ \ \ configLIST\_VOLATILE\ TickType\_t\ xItemValue;\ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ The\ value\ being\ listed.\ \ In\ most\ cases\ this\ is\ used\ to\ sort\ the\ list\ in\ descending\ order.\ */}}
\DoxyCodeLine{00144\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t___i_t_e_m}{xLIST\_ITEM}}\ *\ configLIST\_VOLATILE\ pxNext;\ \ \ \ \ \ \ \textcolor{comment}{/*<\ Pointer\ to\ the\ next\ ListItem\_t\ in\ the\ list.\ */}}
\DoxyCodeLine{00145\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t___i_t_e_m}{xLIST\_ITEM}}\ *\ configLIST\_VOLATILE\ pxPrevious;\ \ \ \textcolor{comment}{/*<\ Pointer\ to\ the\ previous\ ListItem\_t\ in\ the\ list.\ */}}
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{keywordtype}{void}\ *\ pvOwner;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Pointer\ to\ the\ object\ (normally\ a\ TCB)\ that\ contains\ the\ list\ item.\ \ There\ is\ therefore\ a\ two\ way\ link\ between\ the\ object\ containing\ the\ list\ item\ and\ the\ list\ item\ itself.\ */}}
\DoxyCodeLine{00147\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t}{xLIST}}\ *\ configLIST\_VOLATILE\ pxContainer;\ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Pointer\ to\ the\ list\ in\ which\ this\ list\ item\ is\ placed\ (if\ any).\ */}}
\DoxyCodeLine{00148\ \ \ \ \ listSECOND\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Set\ to\ a\ known\ value\ if\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ is\ set\ to\ 1.\ */}}
\DoxyCodeLine{00149\ \};}
\DoxyCodeLine{00150\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t___i_t_e_m}{xLIST\_ITEM}}\ ListItem\_t;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ For\ some\ reason\ lint\ wants\ this\ as\ two\ separate\ definitions.\ */}}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_m_i_n_i___l_i_s_t___i_t_e_m}{xMINI\_LIST\_ITEM}}}
\DoxyCodeLine{00153\ \{}
\DoxyCodeLine{00154\ \ \ \ \ listFIRST\_LIST\_ITEM\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Set\ to\ a\ known\ value\ if\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ is\ set\ to\ 1.\ */}}
\DoxyCodeLine{00155\ \ \ \ \ configLIST\_VOLATILE\ TickType\_t\ xItemValue;}
\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t___i_t_e_m}{xLIST\_ITEM}}\ *\ configLIST\_VOLATILE\ pxNext;}
\DoxyCodeLine{00157\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t___i_t_e_m}{xLIST\_ITEM}}\ *\ configLIST\_VOLATILE\ pxPrevious;}
\DoxyCodeLine{00158\ \};}
\DoxyCodeLine{00159\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_m_i_n_i___l_i_s_t___i_t_e_m}{xMINI\_LIST\_ITEM}}\ MiniListItem\_t;}
\DoxyCodeLine{00160\ }
\DoxyCodeLine{00161\ \textcolor{comment}{/*}}
\DoxyCodeLine{00162\ \textcolor{comment}{\ *\ Definition\ of\ the\ type\ of\ queue\ used\ by\ the\ scheduler.}}
\DoxyCodeLine{00163\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00164\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structx_l_i_s_t}{xLIST}}}
\DoxyCodeLine{00165\ \{}
\DoxyCodeLine{00166\ \ \ \ \ listFIRST\_LIST\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Set\ to\ a\ known\ value\ if\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ is\ set\ to\ 1.\ */}}
\DoxyCodeLine{00167\ \ \ \ \ \textcolor{keyword}{volatile}\ UBaseType\_t\ uxNumberOfItems;}
\DoxyCodeLine{00168\ \ \ \ \ ListItem\_t\ *\ configLIST\_VOLATILE\ pxIndex;\ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Used\ to\ walk\ through\ the\ list.\ \ Points\ to\ the\ last\ item\ returned\ by\ a\ call\ to\ listGET\_OWNER\_OF\_NEXT\_ENTRY\ ().\ */}}
\DoxyCodeLine{00169\ \ \ \ \ MiniListItem\_t\ xListEnd;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ List\ item\ that\ contains\ the\ maximum\ possible\ item\ value\ meaning\ it\ is\ always\ at\ the\ end\ of\ the\ list\ and\ is\ therefore\ used\ as\ a\ marker.\ */}}
\DoxyCodeLine{00170\ \ \ \ \ listSECOND\_LIST\_INTEGRITY\_CHECK\_VALUE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*<\ Set\ to\ a\ known\ value\ if\ configUSE\_LIST\_DATA\_INTEGRITY\_CHECK\_BYTES\ is\ set\ to\ 1.\ */}}
\DoxyCodeLine{00171\ \}\ List\_t;}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00173\ \textcolor{comment}{/*}}
\DoxyCodeLine{00174\ \textcolor{comment}{\ *\ Access\ macro\ to\ set\ the\ owner\ of\ a\ list\ item.\ \ The\ owner\ of\ a\ list\ item}}
\DoxyCodeLine{00175\ \textcolor{comment}{\ *\ is\ the\ object\ (usually\ a\ TCB)\ that\ contains\ the\ list\ item.}}
\DoxyCodeLine{00176\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00177\ \textcolor{comment}{\ *\ \(\backslash\)page\ listSET\_LIST\_ITEM\_OWNER\ listSET\_LIST\_ITEM\_OWNER}}
\DoxyCodeLine{00178\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00179\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00180\ \textcolor{preprocessor}{\#define\ listSET\_LIST\_ITEM\_OWNER(\ pxListItem,\ pxOwner\ )\ \ \ \ \ \ (\ (\ pxListItem\ )-\/>pvOwner\ =\ (\ void\ *\ )\ (\ pxOwner\ )\ )}}
\DoxyCodeLine{00181\ }
\DoxyCodeLine{00182\ \textcolor{comment}{/*}}
\DoxyCodeLine{00183\ \textcolor{comment}{\ *\ Access\ macro\ to\ get\ the\ owner\ of\ a\ list\ item.\ \ The\ owner\ of\ a\ list\ item}}
\DoxyCodeLine{00184\ \textcolor{comment}{\ *\ is\ the\ object\ (usually\ a\ TCB)\ that\ contains\ the\ list\ item.}}
\DoxyCodeLine{00185\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00186\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_LIST\_ITEM\_OWNER\ listSET\_LIST\_ITEM\_OWNER}}
\DoxyCodeLine{00187\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00188\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00189\ \textcolor{preprocessor}{\#define\ listGET\_LIST\_ITEM\_OWNER(\ pxListItem\ )\ \ \ (\ (\ pxListItem\ )-\/>pvOwner\ )}}
\DoxyCodeLine{00190\ }
\DoxyCodeLine{00191\ \textcolor{comment}{/*}}
\DoxyCodeLine{00192\ \textcolor{comment}{\ *\ Access\ macro\ to\ set\ the\ value\ of\ the\ list\ item.\ \ In\ most\ cases\ the\ value\ is}}
\DoxyCodeLine{00193\ \textcolor{comment}{\ *\ used\ to\ sort\ the\ list\ in\ descending\ order.}}
\DoxyCodeLine{00194\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00195\ \textcolor{comment}{\ *\ \(\backslash\)page\ listSET\_LIST\_ITEM\_VALUE\ listSET\_LIST\_ITEM\_VALUE}}
\DoxyCodeLine{00196\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00197\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00198\ \textcolor{preprocessor}{\#define\ listSET\_LIST\_ITEM\_VALUE(\ pxListItem,\ xValue\ )\ \ \ (\ (\ pxListItem\ )-\/>xItemValue\ =\ (\ xValue\ )\ )}}
\DoxyCodeLine{00199\ }
\DoxyCodeLine{00200\ \textcolor{comment}{/*}}
\DoxyCodeLine{00201\ \textcolor{comment}{\ *\ Access\ macro\ to\ retrieve\ the\ value\ of\ the\ list\ item.\ \ The\ value\ can}}
\DoxyCodeLine{00202\ \textcolor{comment}{\ *\ represent\ anything\ -\/\ for\ example\ the\ priority\ of\ a\ task,\ or\ the\ time\ at}}
\DoxyCodeLine{00203\ \textcolor{comment}{\ *\ which\ a\ task\ should\ be\ unblocked.}}
\DoxyCodeLine{00204\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00205\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_LIST\_ITEM\_VALUE\ listGET\_LIST\_ITEM\_VALUE}}
\DoxyCodeLine{00206\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00207\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00208\ \textcolor{preprocessor}{\#define\ listGET\_LIST\_ITEM\_VALUE(\ pxListItem\ )\ \ \ (\ (\ pxListItem\ )-\/>xItemValue\ )}}
\DoxyCodeLine{00209\ }
\DoxyCodeLine{00210\ \textcolor{comment}{/*}}
\DoxyCodeLine{00211\ \textcolor{comment}{\ *\ Access\ macro\ to\ retrieve\ the\ value\ of\ the\ list\ item\ at\ the\ head\ of\ a\ given}}
\DoxyCodeLine{00212\ \textcolor{comment}{\ *\ list.}}
\DoxyCodeLine{00213\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00214\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_LIST\_ITEM\_VALUE\ listGET\_LIST\_ITEM\_VALUE}}
\DoxyCodeLine{00215\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00216\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00217\ \textcolor{preprocessor}{\#define\ listGET\_ITEM\_VALUE\_OF\_HEAD\_ENTRY(\ pxList\ )\ \ (\ (\ (\ pxList\ )-\/>xListEnd\ ).pxNext-\/>xItemValue\ )}}
\DoxyCodeLine{00218\ }
\DoxyCodeLine{00219\ \textcolor{comment}{/*}}
\DoxyCodeLine{00220\ \textcolor{comment}{\ *\ Return\ the\ list\ item\ at\ the\ head\ of\ the\ list.}}
\DoxyCodeLine{00221\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00222\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_HEAD\_ENTRY\ listGET\_HEAD\_ENTRY}}
\DoxyCodeLine{00223\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00224\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00225\ \textcolor{preprocessor}{\#define\ listGET\_HEAD\_ENTRY(\ pxList\ )\ \ \ \ (\ (\ (\ pxList\ )-\/>xListEnd\ ).pxNext\ )}}
\DoxyCodeLine{00226\ }
\DoxyCodeLine{00227\ \textcolor{comment}{/*}}
\DoxyCodeLine{00228\ \textcolor{comment}{\ *\ Return\ the\ next\ list\ item.}}
\DoxyCodeLine{00229\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00230\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_NEXT\ listGET\_NEXT}}
\DoxyCodeLine{00231\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00232\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00233\ \textcolor{preprocessor}{\#define\ listGET\_NEXT(\ pxListItem\ )\ \ (\ (\ pxListItem\ )-\/>pxNext\ )}}
\DoxyCodeLine{00234\ }
\DoxyCodeLine{00235\ \textcolor{comment}{/*}}
\DoxyCodeLine{00236\ \textcolor{comment}{\ *\ Return\ the\ list\ item\ that\ marks\ the\ end\ of\ the\ list}}
\DoxyCodeLine{00237\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00238\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_END\_MARKER\ listGET\_END\_MARKER}}
\DoxyCodeLine{00239\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00240\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00241\ \textcolor{preprocessor}{\#define\ listGET\_END\_MARKER(\ pxList\ )\ \ \ \ (\ (\ ListItem\_t\ const\ *\ )\ (\ \&(\ (\ pxList\ )-\/>xListEnd\ )\ )\ )}}
\DoxyCodeLine{00242\ }
\DoxyCodeLine{00243\ \textcolor{comment}{/*}}
\DoxyCodeLine{00244\ \textcolor{comment}{\ *\ Access\ macro\ to\ determine\ if\ a\ list\ contains\ any\ items.\ \ The\ macro\ will}}
\DoxyCodeLine{00245\ \textcolor{comment}{\ *\ only\ have\ the\ value\ true\ if\ the\ list\ is\ empty.}}
\DoxyCodeLine{00246\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00247\ \textcolor{comment}{\ *\ \(\backslash\)page\ listLIST\_IS\_EMPTY\ listLIST\_IS\_EMPTY}}
\DoxyCodeLine{00248\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00249\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00250\ \textcolor{preprocessor}{\#define\ listLIST\_IS\_EMPTY(\ pxList\ )\ (\ (\ (\ pxList\ )-\/>uxNumberOfItems\ ==\ (\ UBaseType\_t\ )\ 0\ )\ ?\ pdTRUE\ :\ pdFALSE\ )}}
\DoxyCodeLine{00251\ }
\DoxyCodeLine{00252\ \textcolor{comment}{/*}}
\DoxyCodeLine{00253\ \textcolor{comment}{\ *\ Access\ macro\ to\ return\ the\ number\ of\ items\ in\ the\ list.}}
\DoxyCodeLine{00254\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00255\ \textcolor{preprocessor}{\#define\ listCURRENT\_LIST\_LENGTH(\ pxList\ )\ \ \ (\ (\ pxList\ )-\/>uxNumberOfItems\ )}}
\DoxyCodeLine{00256\ }
\DoxyCodeLine{00257\ \textcolor{comment}{/*}}
\DoxyCodeLine{00258\ \textcolor{comment}{\ *\ Access\ function\ to\ obtain\ the\ owner\ of\ the\ next\ entry\ in\ a\ list.}}
\DoxyCodeLine{00259\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00260\ \textcolor{comment}{\ *\ The\ list\ member\ pxIndex\ is\ used\ to\ walk\ through\ a\ list.\ \ Calling}}
\DoxyCodeLine{00261\ \textcolor{comment}{\ *\ listGET\_OWNER\_OF\_NEXT\_ENTRY\ increments\ pxIndex\ to\ the\ next\ item\ in\ the\ list}}
\DoxyCodeLine{00262\ \textcolor{comment}{\ *\ and\ returns\ that\ entry's\ pxOwner\ parameter.\ \ Using\ multiple\ calls\ to\ this}}
\DoxyCodeLine{00263\ \textcolor{comment}{\ *\ function\ it\ is\ therefore\ possible\ to\ move\ through\ every\ item\ contained\ in}}
\DoxyCodeLine{00264\ \textcolor{comment}{\ *\ a\ list.}}
\DoxyCodeLine{00265\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00266\ \textcolor{comment}{\ *\ The\ pxOwner\ parameter\ of\ a\ list\ item\ is\ a\ pointer\ to\ the\ object\ that\ owns}}
\DoxyCodeLine{00267\ \textcolor{comment}{\ *\ the\ list\ item.\ \ In\ the\ scheduler\ this\ is\ normally\ a\ task\ control\ block.}}
\DoxyCodeLine{00268\ \textcolor{comment}{\ *\ The\ pxOwner\ parameter\ effectively\ creates\ a\ two\ way\ link\ between\ the\ list}}
\DoxyCodeLine{00269\ \textcolor{comment}{\ *\ item\ and\ its\ owner.}}
\DoxyCodeLine{00270\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00271\ \textcolor{comment}{\ *\ @param\ pxTCB\ pxTCB\ is\ set\ to\ the\ address\ of\ the\ owner\ of\ the\ next\ list\ item.}}
\DoxyCodeLine{00272\ \textcolor{comment}{\ *\ @param\ pxList\ The\ list\ from\ which\ the\ next\ item\ owner\ is\ to\ be\ returned.}}
\DoxyCodeLine{00273\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00274\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_OWNER\_OF\_NEXT\_ENTRY\ listGET\_OWNER\_OF\_NEXT\_ENTRY}}
\DoxyCodeLine{00275\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00276\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00277\ \textcolor{preprocessor}{\#define\ listGET\_OWNER\_OF\_NEXT\_ENTRY(\ pxTCB,\ pxList\ )\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00278\ \textcolor{preprocessor}{\{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00279\ \textcolor{preprocessor}{List\_t\ *\ const\ pxConstList\ =\ (\ pxList\ );\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00280\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ Increment\ the\ index\ to\ the\ next\ item\ and\ return\ the\ item,\ ensuring\ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00281\ \textcolor{preprocessor}{\ \ \ \ }\textcolor{comment}{/*\ we\ don't\ return\ the\ marker\ used\ at\ the\ end\ of\ the\ list.\ \ */}\textcolor{preprocessor}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00282\ \textcolor{preprocessor}{\ \ \ \ (\ pxConstList\ )-\/>pxIndex\ =\ (\ pxConstList\ )-\/>pxIndex-\/>pxNext;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00283\ \textcolor{preprocessor}{\ \ \ \ if(\ (\ void\ *\ )\ (\ pxConstList\ )-\/>pxIndex\ ==\ (\ void\ *\ )\ \&(\ (\ pxConstList\ )-\/>xListEnd\ )\ )\ \ \(\backslash\)}}
\DoxyCodeLine{00284\ \textcolor{preprocessor}{\ \ \ \ \{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00285\ \textcolor{preprocessor}{\ \ \ \ \ \ \ \ (\ pxConstList\ )-\/>pxIndex\ =\ (\ pxConstList\ )-\/>pxIndex-\/>pxNext;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00286\ \textcolor{preprocessor}{\ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00287\ \textcolor{preprocessor}{\ \ \ \ (\ pxTCB\ )\ =\ (\ pxConstList\ )-\/>pxIndex-\/>pvOwner;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \(\backslash\)}}
\DoxyCodeLine{00288\ \textcolor{preprocessor}{\}}}
\DoxyCodeLine{00289\ }
\DoxyCodeLine{00290\ }
\DoxyCodeLine{00291\ \textcolor{comment}{/*}}
\DoxyCodeLine{00292\ \textcolor{comment}{\ *\ Access\ function\ to\ obtain\ the\ owner\ of\ the\ first\ entry\ in\ a\ list.\ \ Lists}}
\DoxyCodeLine{00293\ \textcolor{comment}{\ *\ are\ normally\ sorted\ in\ ascending\ item\ value\ order.}}
\DoxyCodeLine{00294\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00295\ \textcolor{comment}{\ *\ This\ function\ returns\ the\ pxOwner\ member\ of\ the\ first\ item\ in\ the\ list.}}
\DoxyCodeLine{00296\ \textcolor{comment}{\ *\ The\ pxOwner\ parameter\ of\ a\ list\ item\ is\ a\ pointer\ to\ the\ object\ that\ owns}}
\DoxyCodeLine{00297\ \textcolor{comment}{\ *\ the\ list\ item.\ \ In\ the\ scheduler\ this\ is\ normally\ a\ task\ control\ block.}}
\DoxyCodeLine{00298\ \textcolor{comment}{\ *\ The\ pxOwner\ parameter\ effectively\ creates\ a\ two\ way\ link\ between\ the\ list}}
\DoxyCodeLine{00299\ \textcolor{comment}{\ *\ item\ and\ its\ owner.}}
\DoxyCodeLine{00300\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00301\ \textcolor{comment}{\ *\ @param\ pxList\ The\ list\ from\ which\ the\ owner\ of\ the\ head\ item\ is\ to\ be}}
\DoxyCodeLine{00302\ \textcolor{comment}{\ *\ returned.}}
\DoxyCodeLine{00303\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00304\ \textcolor{comment}{\ *\ \(\backslash\)page\ listGET\_OWNER\_OF\_HEAD\_ENTRY\ listGET\_OWNER\_OF\_HEAD\_ENTRY}}
\DoxyCodeLine{00305\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00306\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00307\ \textcolor{preprocessor}{\#define\ listGET\_OWNER\_OF\_HEAD\_ENTRY(\ pxList\ )\ \ (\ (\&(\ (\ pxList\ )-\/>xListEnd\ ))-\/>pxNext-\/>pvOwner\ )}}
\DoxyCodeLine{00308\ }
\DoxyCodeLine{00309\ \textcolor{comment}{/*}}
\DoxyCodeLine{00310\ \textcolor{comment}{\ *\ Check\ to\ see\ if\ a\ list\ item\ is\ within\ a\ list.\ \ The\ list\ item\ maintains\ a}}
\DoxyCodeLine{00311\ \textcolor{comment}{\ *\ "{}container"{}\ pointer\ that\ points\ to\ the\ list\ it\ is\ in.\ \ All\ this\ macro\ does}}
\DoxyCodeLine{00312\ \textcolor{comment}{\ *\ is\ check\ to\ see\ if\ the\ container\ and\ the\ list\ match.}}
\DoxyCodeLine{00313\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00314\ \textcolor{comment}{\ *\ @param\ pxList\ The\ list\ we\ want\ to\ know\ if\ the\ list\ item\ is\ within.}}
\DoxyCodeLine{00315\ \textcolor{comment}{\ *\ @param\ pxListItem\ The\ list\ item\ we\ want\ to\ know\ if\ is\ in\ the\ list.}}
\DoxyCodeLine{00316\ \textcolor{comment}{\ *\ @return\ pdTRUE\ if\ the\ list\ item\ is\ in\ the\ list,\ otherwise\ pdFALSE.}}
\DoxyCodeLine{00317\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00318\ \textcolor{preprocessor}{\#define\ listIS\_CONTAINED\_WITHIN(\ pxList,\ pxListItem\ )\ (\ (\ (\ pxListItem\ )-\/>pxContainer\ ==\ (\ pxList\ )\ )\ ?\ (\ pdTRUE\ )\ :\ (\ pdFALSE\ )\ )}}
\DoxyCodeLine{00319\ }
\DoxyCodeLine{00320\ \textcolor{comment}{/*}}
\DoxyCodeLine{00321\ \textcolor{comment}{\ *\ Return\ the\ list\ a\ list\ item\ is\ contained\ within\ (referenced\ from).}}
\DoxyCodeLine{00322\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00323\ \textcolor{comment}{\ *\ @param\ pxListItem\ The\ list\ item\ being\ queried.}}
\DoxyCodeLine{00324\ \textcolor{comment}{\ *\ @return\ A\ pointer\ to\ the\ List\_t\ object\ that\ references\ the\ pxListItem}}
\DoxyCodeLine{00325\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00326\ \textcolor{preprocessor}{\#define\ listLIST\_ITEM\_CONTAINER(\ pxListItem\ )\ (\ (\ pxListItem\ )-\/>pxContainer\ )}}
\DoxyCodeLine{00327\ }
\DoxyCodeLine{00328\ \textcolor{comment}{/*}}
\DoxyCodeLine{00329\ \textcolor{comment}{\ *\ This\ provides\ a\ crude\ means\ of\ knowing\ if\ a\ list\ has\ been\ initialised,\ as}}
\DoxyCodeLine{00330\ \textcolor{comment}{\ *\ pxList-\/>xListEnd.xItemValue\ is\ set\ to\ portMAX\_DELAY\ by\ the\ vListInitialise()}}
\DoxyCodeLine{00331\ \textcolor{comment}{\ *\ function.}}
\DoxyCodeLine{00332\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00333\ \textcolor{preprocessor}{\#define\ listLIST\_IS\_INITIALISED(\ pxList\ )\ (\ (\ pxList\ )-\/>xListEnd.xItemValue\ ==\ portMAX\_DELAY\ )}}
\DoxyCodeLine{00334\ }
\DoxyCodeLine{00335\ \textcolor{comment}{/*}}
\DoxyCodeLine{00336\ \textcolor{comment}{\ *\ Must\ be\ called\ before\ a\ list\ is\ used!\ \ This\ initialises\ all\ the\ members}}
\DoxyCodeLine{00337\ \textcolor{comment}{\ *\ of\ the\ list\ structure\ and\ inserts\ the\ xListEnd\ item\ into\ the\ list\ as\ a}}
\DoxyCodeLine{00338\ \textcolor{comment}{\ *\ marker\ to\ the\ back\ of\ the\ list.}}
\DoxyCodeLine{00339\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00340\ \textcolor{comment}{\ *\ @param\ pxList\ Pointer\ to\ the\ list\ being\ initialised.}}
\DoxyCodeLine{00341\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00342\ \textcolor{comment}{\ *\ \(\backslash\)page\ vListInitialise\ vListInitialise}}
\DoxyCodeLine{00343\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00344\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00345\ \textcolor{keywordtype}{void}\ vListInitialise(\ List\_t\ *\ \textcolor{keyword}{const}\ pxList\ )\ PRIVILEGED\_FUNCTION;}
\DoxyCodeLine{00346\ }
\DoxyCodeLine{00347\ \textcolor{comment}{/*}}
\DoxyCodeLine{00348\ \textcolor{comment}{\ *\ Must\ be\ called\ before\ a\ list\ item\ is\ used.\ \ This\ sets\ the\ list\ container\ to}}
\DoxyCodeLine{00349\ \textcolor{comment}{\ *\ null\ so\ the\ item\ does\ not\ think\ that\ it\ is\ already\ contained\ in\ a\ list.}}
\DoxyCodeLine{00350\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00351\ \textcolor{comment}{\ *\ @param\ pxItem\ Pointer\ to\ the\ list\ item\ being\ initialised.}}
\DoxyCodeLine{00352\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00353\ \textcolor{comment}{\ *\ \(\backslash\)page\ vListInitialiseItem\ vListInitialiseItem}}
\DoxyCodeLine{00354\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00355\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00356\ \textcolor{keywordtype}{void}\ vListInitialiseItem(\ ListItem\_t\ *\ \textcolor{keyword}{const}\ pxItem\ )\ PRIVILEGED\_FUNCTION;}
\DoxyCodeLine{00357\ }
\DoxyCodeLine{00358\ \textcolor{comment}{/*}}
\DoxyCodeLine{00359\ \textcolor{comment}{\ *\ Insert\ a\ list\ item\ into\ a\ list.\ \ The\ item\ will\ be\ inserted\ into\ the\ list\ in}}
\DoxyCodeLine{00360\ \textcolor{comment}{\ *\ a\ position\ determined\ by\ its\ item\ value\ (descending\ item\ value\ order).}}
\DoxyCodeLine{00361\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00362\ \textcolor{comment}{\ *\ @param\ pxList\ The\ list\ into\ which\ the\ item\ is\ to\ be\ inserted.}}
\DoxyCodeLine{00363\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00364\ \textcolor{comment}{\ *\ @param\ pxNewListItem\ The\ item\ that\ is\ to\ be\ placed\ in\ the\ list.}}
\DoxyCodeLine{00365\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00366\ \textcolor{comment}{\ *\ \(\backslash\)page\ vListInsert\ vListInsert}}
\DoxyCodeLine{00367\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00368\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00369\ \textcolor{keywordtype}{void}\ vListInsert(\ List\_t\ *\ \textcolor{keyword}{const}\ pxList,\ ListItem\_t\ *\ \textcolor{keyword}{const}\ pxNewListItem\ )\ PRIVILEGED\_FUNCTION;}
\DoxyCodeLine{00370\ }
\DoxyCodeLine{00371\ \textcolor{comment}{/*}}
\DoxyCodeLine{00372\ \textcolor{comment}{\ *\ Insert\ a\ list\ item\ into\ a\ list.\ \ The\ item\ will\ be\ inserted\ in\ a\ position}}
\DoxyCodeLine{00373\ \textcolor{comment}{\ *\ such\ that\ it\ will\ be\ the\ last\ item\ within\ the\ list\ returned\ by\ multiple}}
\DoxyCodeLine{00374\ \textcolor{comment}{\ *\ calls\ to\ listGET\_OWNER\_OF\_NEXT\_ENTRY.}}
\DoxyCodeLine{00375\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00376\ \textcolor{comment}{\ *\ The\ list\ member\ pxIndex\ is\ used\ to\ walk\ through\ a\ list.\ \ Calling}}
\DoxyCodeLine{00377\ \textcolor{comment}{\ *\ listGET\_OWNER\_OF\_NEXT\_ENTRY\ increments\ pxIndex\ to\ the\ next\ item\ in\ the\ list.}}
\DoxyCodeLine{00378\ \textcolor{comment}{\ *\ Placing\ an\ item\ in\ a\ list\ using\ vListInsertEnd\ effectively\ places\ the\ item}}
\DoxyCodeLine{00379\ \textcolor{comment}{\ *\ in\ the\ list\ position\ pointed\ to\ by\ pxIndex.\ \ This\ means\ that\ every\ other}}
\DoxyCodeLine{00380\ \textcolor{comment}{\ *\ item\ within\ the\ list\ will\ be\ returned\ by\ listGET\_OWNER\_OF\_NEXT\_ENTRY\ before}}
\DoxyCodeLine{00381\ \textcolor{comment}{\ *\ the\ pxIndex\ parameter\ again\ points\ to\ the\ item\ being\ inserted.}}
\DoxyCodeLine{00382\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00383\ \textcolor{comment}{\ *\ @param\ pxList\ The\ list\ into\ which\ the\ item\ is\ to\ be\ inserted.}}
\DoxyCodeLine{00384\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00385\ \textcolor{comment}{\ *\ @param\ pxNewListItem\ The\ list\ item\ to\ be\ inserted\ into\ the\ list.}}
\DoxyCodeLine{00386\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00387\ \textcolor{comment}{\ *\ \(\backslash\)page\ vListInsertEnd\ vListInsertEnd}}
\DoxyCodeLine{00388\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00389\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00390\ \textcolor{keywordtype}{void}\ vListInsertEnd(\ List\_t\ *\ \textcolor{keyword}{const}\ pxList,\ ListItem\_t\ *\ \textcolor{keyword}{const}\ pxNewListItem\ )\ PRIVILEGED\_FUNCTION;}
\DoxyCodeLine{00391\ }
\DoxyCodeLine{00392\ \textcolor{comment}{/*}}
\DoxyCodeLine{00393\ \textcolor{comment}{\ *\ Remove\ an\ item\ from\ a\ list.\ \ The\ list\ item\ has\ a\ pointer\ to\ the\ list\ that}}
\DoxyCodeLine{00394\ \textcolor{comment}{\ *\ it\ is\ in,\ so\ only\ the\ list\ item\ need\ be\ passed\ into\ the\ function.}}
\DoxyCodeLine{00395\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00396\ \textcolor{comment}{\ *\ @param\ uxListRemove\ The\ item\ to\ be\ removed.\ \ The\ item\ will\ remove\ itself\ from}}
\DoxyCodeLine{00397\ \textcolor{comment}{\ *\ the\ list\ pointed\ to\ by\ it's\ pxContainer\ parameter.}}
\DoxyCodeLine{00398\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00399\ \textcolor{comment}{\ *\ @return\ The\ number\ of\ items\ that\ remain\ in\ the\ list\ after\ the\ list\ item\ has}}
\DoxyCodeLine{00400\ \textcolor{comment}{\ *\ been\ removed.}}
\DoxyCodeLine{00401\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00402\ \textcolor{comment}{\ *\ \(\backslash\)page\ uxListRemove\ uxListRemove}}
\DoxyCodeLine{00403\ \textcolor{comment}{\ *\ \(\backslash\)ingroup\ LinkedList}}
\DoxyCodeLine{00404\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00405\ UBaseType\_t\ uxListRemove(\ ListItem\_t\ *\ \textcolor{keyword}{const}\ pxItemToRemove\ )\ PRIVILEGED\_FUNCTION;}
\DoxyCodeLine{00406\ }
\DoxyCodeLine{00407\ \textcolor{preprocessor}{\#ifdef\ \_\_cplusplus}}
\DoxyCodeLine{00408\ \}}
\DoxyCodeLine{00409\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00410\ }
\DoxyCodeLine{00411\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00412\ }

\end{DoxyCode}
